

package commandz.var;


/**
 *  Interface for a Variable.
 *
 *  A Variable provides storage and a method for parsing
 *  a specific piece of data such as a number or a Boolean truth.
 */
public interface Variable
{
    /**
     *  Returns a descriptive name of the type of data stored in this Variable.
     *
     *  @return A String containing a type-name.
     */
    String getTypeName();

    /**
     *  Parses the given string into the storage of this Variable.
     *
     *  @param str A textual representation of the Variable to parse.
     *
     *  @return true on success, false on error.
     */
    boolean parse(final String str);

    /**
     *  Formats the value of this Variable into a readable String.
     *
     *  @return A textual representation of the value of this Variable.
     */
    String format();
}
